#include "stdafx.h"

#include "MySTL.h"
using namespace MySTL;

int _tmain( int argc, _TCHAR* argv[] )
{
	MyString str( " TEST " );
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;
	
	str.TrimLeft();
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	str.TrimRight();
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	str = _T( " TEST " );
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	str.Trim();
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	str = str.MakeLower();
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	str = str.MakeUpper();
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	MyString str2 = " 1234 ";
	str = str2;
	cout << "Length : " << str.length() << " - " << str.c_str() << endl;

	// TDD _ :)
	MyDeque< INT_PTR > myDeque;
	for( INT_PTR i = 0; i < 10; i++ )
		myDeque.PushBack( i );

	cout << "Deque ... " << endl;
	while( myDeque.GetSize() )
	{
		cout << myDeque[ 0 ] << endl;
		myDeque.PopFront();
	}

	MyString sFullPath = _T( "C:\\WINDOWS\\regopt.log" );
	MyString sPath, sFileName, sExtension;
	MyString::ParsePath( sFullPath, sPath, sFileName );

	MyString::ParseFileName( sFileName, sFileName, sExtension );

	sFullPath = sPath + _T( "\\" ) + sFileName + _T( "." ) + sExtension;

	string s( _T( "123" ) );
	sFullPath += s;
	
	
	return 0;
}

